﻿<%@ Page Title="历史数据查询" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true"
    CodeBehind="SearchHis.aspx.cs" Inherits="tmsWeb.SearchHis" %>

<%@ Register Assembly="weblib" Namespace="micsun.Web.WebControls" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderBody" runat="server">
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <table border="0" cellpadding="0" cellspacing="0" width="100%" class="input_1" style="width: 100%">
                <tr>
                    <td>
                        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                            <tr height="30">
                                <td align="center" style="font-size: medium">
                                    历史数据查询
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td class="tabcontent" style="border-width: thin">
                        <table width="100%" align="center">
                            <tr>
                                <td valign="middle" nowrap align="center" height="30">
                                    <table cellpadding="5" cellspacing="5" style="width: 100%">
                                        <tr>
                                            <td align="right">
                                                选择变电站
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="ddlStation" runat="server" Width="120px" AutoPostBack="True"
                                                    OnSelectedIndexChanged="ddlStation_SelectedIndexChanged">
                                                </asp:DropDownList>
                                            </td>
                                            <td>
                                                选择安装场所
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="ddlPlace" runat="server" Width="120px" AutoPostBack="True"
                                                    OnSelectedIndexChanged="ddlPlace_SelectedIndexChanged">
                                                </asp:DropDownList>
                                            </td>
                                            <td>
                                                选择测温点
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="ddlTemperature" runat="server" Width="120px" AutoPostBack="True"
                                                    OnSelectedIndexChanged="ddlTemperature_SelectedIndexChanged">
                                                </asp:DropDownList>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right">
                                                时间条件
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="ddlDateType" runat="server" Width="120px" OnSelectedIndexChanged="ddlDateType_SelectedIndexChanged"
                                                    AutoPostBack="True">
                                                    <asp:ListItem>当月</asp:ListItem>
                                                    <asp:ListItem>历史</asp:ListItem>
                                                </asp:DropDownList>
                                            </td>
                                            <td colspan="2">
                                                <asp:Panel ID="PanelData" runat="server" HorizontalAlign="Left" Visible="False">
                                                    <asp:DropDownList ID="ddlDateSelect" runat="server" Width="120px">
                                                    </asp:DropDownList>
                                                    &nbsp;</asp:Panel>
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right">
                                                <asp:CheckBox ID="CheckBoxTemp" runat="server" Text="是否设置温度范围" AutoPostBack="True"
                                                    OnCheckedChanged="CheckBoxTemp_CheckedChanged" />
                                            </td>
                                            <td>
                                                <asp:DropDownList ID="ddlDateType0" runat="server" Width="120px" AutoPostBack="True"
                                                    Enabled="False" OnSelectedIndexChanged="ddlDateType0_SelectedIndexChanged">
                                                    <asp:ListItem>大于</asp:ListItem>
                                                    <asp:ListItem>小于</asp:ListItem>
                                                    <asp:ListItem>两温度之间</asp:ListItem>
                                                </asp:DropDownList>
                                            </td>
                                            <td>
                                                <asp:Panel ID="PanelTMax" runat="server" HorizontalAlign="Left" Enabled="False">
                                                    <asp:TextBox ID="TextBox1" runat="server" Width="80px" CssClass="input_1"></asp:TextBox>
                                                    &nbsp;℃</asp:Panel>
                                            </td>
                                            <td>
                                                <asp:Panel ID="PanelTMin" runat="server" HorizontalAlign="Left" Visible="False">
                                                    至&nbsp;&nbsp;
                                                    <asp:TextBox ID="TextBox2" runat="server" CssClass="input_1" Width="80px"></asp:TextBox>&nbsp;℃</asp:Panel>
                                            </td>
                                            <td>
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="height: 20px" align="right">
                                                <asp:CheckBox ID="CheckBoxAlarm" runat="server" Text="是否根据报警情况" AutoPostBack="True"
                                                    OnCheckedChanged="CheckBoxAlarm_CheckedChanged" />
                                            </td>
                                            <td colspan="2" style="height: 20px">
                                                <asp:Panel ID="Panel1" runat="server" Enabled="False">
                                                    <asp:RadioButton ID="RadioButton1" runat="server" Text="含报警信息" GroupName="g1" />
                                                    &nbsp;<asp:RadioButton ID="RadioButton2" runat="server" Text="非含报警信息" GroupName="g1" />
                                                </asp:Panel>
                                            </td>
                                            <td style="height: 20px">
                                            </td>
                                            <td style="height: 20px">
                                            </td>
                                            <td style="height: 20px">
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="6">
                                                <fieldset style="border-width: 1px; border-style: solid;">
                                                    <legend style="color: #FFFFFF">测温点信息</legend>
                                                    <table cellpadding="5" cellspacing="5" style="width: 100%">
                                                        <tr>
                                                            <td style="width: 128px" align="right">
                                                                测温点编号
                                                            </td>
                                                            <td style="width: 133px">
                                                                <asp:Label ID="lblId" runat="server"></asp:Label>
                                                            </td>
                                                            <td align="right" style="width: 104px">
                                                                测温点名称
                                                            </td>
                                                            <td style="width: 214px">
                                                                <asp:Label ID="lblName" runat="server"></asp:Label>
                                                            </td>
                                                            <td align="left">
                                                                &nbsp;
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td style="width: 128px" align="right">
                                                                上限
                                                            </td>
                                                            <td style="width: 133px">
                                                                <asp:Label ID="lblMax" runat="server"></asp:Label>
                                                                ℃
                                                            </td>
                                                            <td align="right" style="width: 104px">
                                                                下限
                                                            </td>
                                                            <td style="width: 214px">
                                                                <asp:Label ID="lblMin" runat="server"></asp:Label>
                                                                ℃
                                                            </td>
                                                            <td align="left">
                                                                <asp:Button ID="btnGo" runat="server" CssClass="input_1" Text="搜索" Width="60px" OnClick="btnGo_Click" />
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </fieldset>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="6" height="24">
                                                <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
                                                    <ProgressTemplate>
                                                        数据查询中......
                                                    </ProgressTemplate>
                                                </asp:UpdateProgress>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td valign="top">
                                    <cc1:GridViewPlus2 ID="ResultDG" runat="server" Width="100%" AllowCustomPaging="True"
                                        AllowPaging="True" AutoGenerateColumns="False" PageSize="15" CellPadding="4"
                                        ForeColor="#333333" GridLines="None" BorderColor="#657F93" BorderStyle="Solid"
                                        BorderWidth="1px">
                                        <PagerStyle NextPageText="&gt;&gt;" PrevPageText="&lt;&lt;" PageButtonCount="10"
                                            BackColor="#284775" ForeColor="White" HorizontalAlign="Center"></PagerStyle>
                                        <Columns>
                                            <asp:TemplateColumn>
                                                <ItemTemplate>
                                                    <asp:Label ID="TempLabel" runat="server"></asp:Label>
                                                </ItemTemplate>
                                                <HeaderStyle Width="30px" />
                                            </asp:TemplateColumn>
                                            <asp:BoundColumn DataField="ResKey" Visible="false" />
                                            <asp:BoundColumn DataField="spvDateTime" HeaderText="监测日期时刻" />
                                            <asp:BoundColumn DataField="ResValue" HeaderText="监测值" />
                                            <asp:TemplateColumn HeaderText="当前状态">
                                                <ItemTemplate>
                                                    <%#DataBinder.Eval(Container, "DataItem.IsAlarm").ToString() == "0" ? "正常" : "异常"%>
                                                </ItemTemplate>
                                            </asp:TemplateColumn>
                                        </Columns>
                                        <ItemStyle ForeColor="#333333" BackColor="#F7F6F3"></ItemStyle>
                                        <SelectedItemStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                        <HeaderStyle ForeColor="White" BackColor="#5D7B9D" Font-Bold="True"></HeaderStyle>
                                        <FooterStyle BackColor="#5D7B9D" ForeColor="White" Font-Bold="True" />
                                        <AlternatingItemStyle BackColor="White" ForeColor="#284775" />
                                        <EditItemStyle BackColor="#999999" />
                                    </cc1:GridViewPlus2>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
    </form>
</asp:Content>
